﻿package mortal.game.view.task.drama.operations
{
    import Message.DB.Tables.*;
    import mortal.game.*;
    import mortal.game.view.task.drama.*;

    public class TaskDramaScreenMove extends Object implements ITaskDramaStepCommand
    {
        public static var isTweening:Boolean = false;

        public function TaskDramaScreenMove()
        {
            return;
        }// end function

        public function call(param1:TTaskDrama, param2:Function = null) : void
        {
            var tweenFinish1:Function;
            var data:* = param1;
            var callback:* = param2;
            tweenFinish1 = function () : void
            {
                isTweening = false;
                if (callback != null)
                {
                    callback.apply();
                }
                return;
            }// end function
            ;
            isTweening = true;
            var time:Number;
            if (TaskDramaOperator.ationTime > 0)
            {
                time = TaskDramaOperator.ationTime;
            }
            Game.scene.tweenScrollRect(data.valueOne, data.valueTwo, time, tweenFinish1);
            return;
        }// end function

        public function cancel(param1:TTaskDrama, param2:Function = null) : void
        {
            var tweenFinish2:Function;
            var data:* = param1;
            var callback:* = param2;
            tweenFinish2 = function () : void
            {
                if (callback != null)
                {
                    callback.apply();
                }
                return;
            }// end function
            ;
            var time:Number;
            if (TaskDramaOperator.ationTime > 0)
            {
                time = TaskDramaOperator.ationTime;
            }
            if (time > 1)
            {
                time;
            }
            Game.scene.stopTweenScrollRect(time, tweenFinish2);
            return;
        }// end function

        public function dispose() : void
        {
            return;
        }// end function

    }
}
